package com.gs.api.project.video.web;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gs.api.core.Result;
import com.gs.api.project.video.entity.BzBaseinfo;
import com.gs.api.project.video.service.IBzBaseinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 小程序基础配置 前端控制器
 * </p>
 *
 * @author guoshao
 * @since 2022-04-11
 */
@RestController
@RequestMapping("{appid}/baseinfo")
public class BzBaseinfoController {

    @Autowired
    private IBzBaseinfoService baseinfoService;


    @GetMapping("getBaseInfo")
    public Result getBaseInfo(@PathVariable String appid){

        BzBaseinfo baseinfo = baseinfoService.getOne(new QueryWrapper<BzBaseinfo>().eq("appid", appid).last("limit 1"));
        return Result.success(baseinfo);
    }

}
